//
//  BVMeSeenWhoViewController.m
//  XiangYu
//
//  Created by YYKJ on 2017/6/1.
//  Copyright © 2017年 YYKJ. All rights reserved.
//  我看过谁

#import "BVMeSeenWhoViewController.h"
#import "BVMeSeenWhoCell.h"

#define BUY_MESEEWWHO_TABLEVIEWCELL1 @"BVMeSeenWhoCell"

@interface BVMeSeenWhoViewController ()<UITableViewDelegate ,UITableViewDataSource>

@property (nonatomic ,strong) UITableView      *tabView;

@end

@implementation BVMeSeenWhoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view setBackgroundColor:[UIColor BVBackgroundLightGrayColor]];
    
    [self layoutUI];
}

-(void)layoutUI{
    
    [self.view addSubview:self.tabView];
    
}

#pragma mark -
#pragma mark - UITableViewDelegate,UITableViewDataSource
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
    UIView *view = [UIView new];
    [view setBackgroundColor:[UIColor clearColor]];
    return view;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    
    return 10;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    BVMeSeenWhoCell *cell = [tableView dequeueReusableCellWithIdentifier:BUY_MESEEWWHO_TABLEVIEWCELL1];
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    
    return cell;
    
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    [tableView deselectRowAtIndexPath:indexPath animated:NO];
}


-(UITableView *)tabView{
    if (!_tabView) {
        self.tabView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, ScreenW, ScreenH-64-49) style:UITableViewStylePlain];
        [self.tabView setDelegate:self];
        [self.tabView setDataSource:self];
        [self.tabView setBackgroundColor:[UIColor clearColor]];
        [self.tabView setTableFooterView:[UIView new]];
        [self.tabView setShowsVerticalScrollIndicator:NO];
        [self.tabView setRowHeight:80];
        [self.tabView registerClass:[BVMeSeenWhoCell class] forCellReuseIdentifier:BUY_MESEEWWHO_TABLEVIEWCELL1];
        
    }
    
    return _tabView;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}


@end
